import Vue from 'vue'
import toast from './co-toast'

const Toast = Vue.extend(toast)
export const createToast = (option) => {
  const toastInstance = new Toast({
    data () {
      return {
        duration: option.duration,
        message: option.message
      }
    }
  })
  const $el = toastInstance.$mount().$el
  document.body.appendChild($el)
}
